﻿using NB.MGJ.Common.MVC;
using NB.MGJ.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace NB.MGJ.Web.Controllers
{
    public partial class CodeManageController : BaseController
    {
        public ActionResult CodeDisableList()
        {
            return View();
        }

        public ActionResult CodeDisableAdd()
        {
            ViewData["ProductId"] = _productService.GetProductSelectList(0, LogOnUser.EnterpriseId);

            ViewData["ProductBatchId"] = _ProductBatchService.GetBatchSelectList(0, LogOnUser.EnterpriseId);

            ViewData["CodeBatch"] = _CodeRelateService.GetGenCodeBatchList(LogOnUser.EnterpriseId, 0);

            return View();
        }


        public ActionResult IsCanInsertAndBinding (CodeManage_CodeRelate model)
        {
            model.ChangeLoginID = LogOnUser.UserID;
            model.ChangeDate = DateTime.Now;
            model.EnterpriseId = LogOnUser.EnterpriseId;

            var result = _codeManageService.IsCanInsertLogAndBinding(model);

           return Json(result);
        }



	}
}